export function formatDate(date) {// 时间格式化
	const d = new Date(date);
	let Y = d.getFullYear() + '-';
	let M = (d.getMonth() + 1 < 10 ? '0' + (d.getMonth() + 1) : d.getMonth() + 1) + '-';
	let D = d.getDate() < 10 ? '0' + d.getDate() : d.getDate();
	let h = (d.getHours() < 10 ? '0' + d.getHours() : d.getHours()) + ':';  // 小时
	let m = (d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes()) + ':'; // 分
	let s = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds() // 秒
	let datetime = `${Y}${M}${D} ${h}${m}${s}`
	return datetime;
}